vt-d: Fix dom0 boot issue with vtd=1 on Stoakley platform. Turn off
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 15 Feb 2008 09:54:28 +0000 (09:54 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 15 Feb 2008 09:54:28 +0000 (09:54 +0000)
excessive messages.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
xen/arch/x86/hvm/vmx/vtd/dmar.c
xen/arch/x86/hvm/vmx/vtd/intel-iommu.c

index 1e320ad27de77e7fc973561b3ea796081d6cfa20..4f3f71e962efb2534883edc7b38556e5c710de80 100644 (file)
@@ -102,7 +102,7 @@ struct iommu * ioapic_to_iommu(unsigned int apic_id)
             return drhd->iommu;
         }
     }
-    dprintk(XENLOG_WARNING VTDPREFIX, "returning NULL\n");
+    dprintk(XENLOG_INFO VTDPREFIX, "returning NULL\n");
     return NULL;
 }
 
index c497b9c3924c70aad28545bbae02adce81f37c8b..1121896a7eafb694a917a85455c1c856f793ec5a 100644 (file)
@@ -1811,7 +1811,18 @@ static int init_vtd_hw(void)
         flush = iommu_get_flush(iommu);
         flush->context = flush_context_reg;
         flush->iotlb = flush_iotlb_reg;
+    }
+    return 0;
+}
+
+static int init_vtd2_hw(void)
+{
+    struct acpi_drhd_unit *drhd;
+    struct iommu *iommu;
 
+    for_each_drhd_unit ( drhd )
+    {
+        iommu = drhd->iommu;
         if ( qinval_setup(iommu) != 0 )
             dprintk(XENLOG_ERR VTDPREFIX,
                     "Queued Invalidation hardware not found\n");
@@ -1883,12 +1894,12 @@ int iommu_setup(void)
     for ( i = 0; i < max_page; i++ )
         iommu_map_page(dom0, i, i);
 
-    enable_vtd_translation();
-    if ( init_vtd_hw() )
-        goto error;
+    init_vtd_hw();
     setup_dom0_devices();
     setup_dom0_rmrr();
     iommu_flush_all();
+    enable_vtd_translation();
+    init_vtd2_hw();
 
     return 0;